package _18_strategy_pattern.v_common;

/**
 * @Description: 封装角色
 * @Auther: 2019/6/25 11:05 by zhang.jy
 */
public class Context {
	//抽象策略
	private Strategy strategy = null;

	//构造函数设置具体策略
	public Context(Strategy _strategy) {
		this.strategy = _strategy;
	}

	//封装后的策略方法
	public void doAnythinig() {
		this.strategy.doSomething();
	}
}